public class Test {
    private String name = "zhangsan";
    private int age = 18;
 
    @Override
    public String toString() {
        return name + " " +age ;
 
    }
 
    public static void main(String[] args) {
        Test test = new Test();
        System.out.println(test);
 
        System.out.println(test.name);
    }
 
 
}